package Utils;

import java.io.IOException;
import java.util.logging.FileHandler;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.logging.SimpleFormatter;

public class CLogger 
{
	private String sName;
	private Logger cLogger;
	public CLogger(String FileName)
	{
		this.setsName(FileName);
		this.setcLogger(Logger.getLogger("FileName"));
		
		FileHandler fh; 
		try {  
            
            fh = new FileHandler("whitebord-m2.log");  
            this.getcLogger().addHandler(fh);  
            this.getcLogger().setLevel(Level.ALL);  
            SimpleFormatter formatter = new SimpleFormatter();  
            fh.setFormatter(formatter);  
              
        } catch (SecurityException e) {  
            e.printStackTrace();  
        } catch (IOException e) {  
            e.printStackTrace();  
        }  
	}

	public String getsName() 
	{
		return sName;
	}

	public void setsName(String sName) 
	{
		this.sName = sName;
	}

	public Logger getcLogger()
	{
		return cLogger;
	}

	public void setcLogger(Logger cLogger)
	{
		this.cLogger = cLogger;
	}
}
